package model

import "time"

type Users struct {
	Id             uint64    `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt      time.Time `gorm:"column:created_at;type:datetime(3);default:NULL;" json:"created_at"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:datetime(3);default:NULL;" json:"updated_at"`
	DeletedAt      time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Mobile         string    `gorm:"column:mobile;type:varchar(11);comment:手机号;not null;" json:"mobile"`                                    // 手机号
	Password       string    `gorm:"column:password;type:varchar(36);comment:密码;not null;" json:"password"`                                 // 密码
	RealNameStatus int32     `gorm:"column:real_name_status;type:int;comment:实名状态 1-未实名 2-已实名;not null;default:1;" json:"real_name_status"` // 实名状态 1-未实名 2-已实名
	Integral       float64   `gorm:"column:integral;type:decimal(10, 2);comment:积分;not null;" json:"integral"`                              // 积分
}

func (r *Users) TableName() string {
	return "users"
}
